function computeFor()
    maxn = 10^6;
    cnt,n,m = 1,1, convert(Int, round(sqrt(maxn)))


    primes = fill(0,(maxn))
    vis = fill(true,(maxn)) #长度为maxn，值为true的数组
    #fill!(vis, true);
    #vis = [true for i = 1:maxn]

    for i in 2:m
        if !vis[i]
            continue
        end
        for j in i*i:i:maxn
            vis[j] = false
        end
    end

	for x in 2:maxn
		if vis[x]
			primes[cnt] = x
			cnt += 1
        end
	end
	(vis, primes)
end
@time computeFor()
